package database;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Meaom implements Serializable {

	private static final long serialVersionUID = -6406272395786237696L;
	private Calendar calendar;
	private boolean finalized;
	private boolean[][] firstLine = new boolean[4][4];
	private boolean[][] secondLine = new boolean[4][4];
	private boolean[][] thirdLine = new boolean[4][4];
	private boolean[][] fourthLine = new boolean[4][4];
	private String[] obs = new String[4];
	private String therapist;
	private String narrative;
	private int total;

	public Meaom() {
		this.calendar = Calendar.getInstance();
		this.narrative = "";
		this.therapist = "";
		this.total = 0;

		for (int i = 0; i < firstLine.length; i++) {
			for (int h = 0; h < firstLine[0].length; h++) {
				this.firstLine[i][h] = false;
				this.secondLine[i][h] = false;
				this.thirdLine[i][h] = false;
				this.fourthLine[i][h] = false;
			}
		}

		for (int i = 0; i < obs.length; i++) {
			this.obs[i] = "";
		}
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public boolean isFinalized() {
		return finalized;
	}

	public void setFinalized(boolean finalized) {
		this.finalized = finalized;
	}

	public boolean[][] getFirstLine() {
		return firstLine;
	}

	public void setFirstLine(boolean[][] firstLine) {
		this.firstLine = firstLine;
	}

	public boolean[][] getSecondLine() {
		return secondLine;
	}

	public void setSecondLine(boolean[][] secondLine) {
		this.secondLine = secondLine;
	}

	public boolean[][] getThirdLine() {
		return thirdLine;
	}

	public void setThirdLine(boolean[][] thirdLine) {
		this.thirdLine = thirdLine;
	}

	public boolean[][] getFourthLine() {
		return fourthLine;
	}

	public void setFourthLine(boolean[][] fourthLine) {
		this.fourthLine = fourthLine;
	}

	public String[] getObs() {
		return obs;
	}

	public void setObs(String[] obs) {
		this.obs = obs;
	}

	public String getTherapist() {
		return therapist;
	}

	public void setTherapist(String therapist) {
		this.therapist = therapist;
	}

	public String getNarrative() {
		return narrative;
	}

	public void setNarrative(String narrative) {
		this.narrative = narrative;
	}

	public String getHour() {
		DateFormat hourFormat = new SimpleDateFormat("HH:mm");
		return "" + hourFormat.format(calendar.getTime());
	}

	public String getDate() {
		DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
		return "" + dateFormat.format(calendar.getTime());
	}
}
